package applauncher;

import com.mongodb.BasicDBObject;


public final class WorkerResources {
	
	protected MongoAdapter resourceInstance = MongoAdapter.getInstance();
	
	public void addProgramm(Programm p)
	{
		if (resourceInstance == null) {
			throw new Exception("Database is not accessible");
		}
		
		BasicDBObject doc = new BasicDBObject();
        doc.put("name", p.getName());
        doc.put("path", p.getPath());
        BasicDBObject info = new BasicDBObject();
        info.put("x", 203);
        info.put("y", 102);
        doc.put("info", info);
        coll.insert(doc);

	}
	
}
